package org.jamin.lending.domain.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import java.sql.Timestamp;

/**
 * Created by xywen on 2016/9/9.
 */
@Entity(name = "common_manager_message")
public class ManagerMessage extends BasicEntity{

    @ManyToOne
    @JoinColumn(name = "auser")
    private Auser auser;

    @Column(name = "read")
    private boolean read = false;

    @Column(name = "message")
    private String message;

    @Column(name = "create_time")
    private Timestamp createTime = new Timestamp(System.currentTimeMillis());

    @Column(name = "read_time",nullable = true)
    private Timestamp readTime;

    public Auser getAuser() {
        return auser;
    }

    public void setAuser(Auser auser) {
        this.auser = auser;
    }

    public boolean isRead() {
        return read;
    }

    public void setRead(boolean read) {
        this.read = read;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Timestamp getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Timestamp createTime) {
        this.createTime = createTime;
    }

    public Timestamp getReadTime() {
        return readTime;
    }

    public void setReadTime(Timestamp readTime) {
        this.readTime = readTime;
    }
}
